<template>
<div id="cv">
  <div class="dv2">
    <el-input   v-model="input" placeholder="请输入姓名,如果不更新,点击右侧搜索按钮"></el-input>
    <el-button class="but" type="primary" icon="el-icon-search"></el-button>
    <el-button class="but1" type="primary">添加项目</el-button>
  </div>
  <div class="dv1">
选择班级:  <el-select v-model="value" placeholder="请选择">
    <el-option
      v-for="item in options"
      :key="item.value"
      :label="item.label"
      :value="item.value">
    </el-option>
  </el-select>
  </div>
	<div>
<el-table 
    :data="tableData"
    border
    style="width: 100%">
    <el-table-column align="center"
    prop="headimgurl"
      label="头像"
      width="80">
    <template slot-scope="scope">
      <el-avatar shape="square"
      :size="50"
      fit="fill"
      :src="scope.row.headimgurl">
	</el-avatar>
    </template>
    </el-table-column>
    <el-table-column align="center"
      prop="name"
      label="姓名"
      width="180">
	  
    </el-table-column>
	 <el-table-column align="center"
      prop="degree"
      label="学历"
      width="180">
    </el-table-column>
    <el-table-column align="center"
      prop="class"
      label="班级"
      width="180">
    </el-table-column>
	 <el-table-column align="center"
      prop="description"
      label="项目"
      width="180">
    </el-table-column>
    <el-table-column align="center"
      prop="cTime"
      label="创建时间">
    </el-table-column>

    <el-table-column label="操作"  align="center">
      <template slot-scope="scope">
		 <el-button class="but2"
     icon="el-icon-view"
          size="mini"
          >查看</el-button>
        <el-button

        class="but2"
        icon="el-icon-edit"
          size="mini"
          @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
        <el-button
          size="mini"
          type="danger"
           icon="el-icon-delete-solid"
          @click="handleDelete(scope.$index, scope.row)">删除</el-button>

      </template>
    </el-table-column>
  </el-table>
  <el-pagination class="el-pagination1"
  background
  layout="prev, pager, next"
  :total="20">
</el-pagination>
  </div>
 
  </div>
</template>

	 
<script>
import * as api from "@/api/users";
	export default {
		 data() {
      return {
         input: '',
         //表格的数据对象
        tableData: [],
		 options: [],
        value: '',
         oldTableData:[],
      }
    },
    created(){
      this.getStuList()
    },
   methods:{
     //获取表格数据
		getStuList(params = {count:15,page:1,classes:""}){
        //发送请求获取数据
      api.getStuListApi()
      .then(res=>{
        console.log(res.data);
        this.tableData = res.data.data
      })
    }
   },
		meta: {
			title: "xyxmgl",
			icon: "iconfont icon-shangpinguanli",
		},
		
	};
</script>
<style scoped lang="less">

/deep/ .dv1{
  position: relative !important;

  text-align: left;
  margin-bottom: 50px;
  margin-top: 20px;

}
.dv2{
  width:300px !important;
  position: relative;
}
.but{
  position: absolute !important;
    color: #409eff;
    background: #ecf5ff;
    border-color: #b3d8ff;
}
.but1{
    position: absolute !important;
    left: 360px;
}
.but2{
     color:#fff;
    background: #266de1;
    border-color: #b3d8ff;
}
.el-pagination1{
  margin-top: 20px;
}


</style>
 


